function toUpper(str) {
    if (str.indexOf('_') > -1) {
        let splitStr = str.split('_')
        console.log(splitStr)
        let result = ''
        for (let [i, item] of splitStr.entries()) {
            if (i > 0) {
                item = item.substring(0, 1).toLocaleUpperCase() + item.substring(1)
            }
            result += item
        }
        return result
    } else {
        return str
    }
}
console.log(toUpper('a_b_c'))
